<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button ui-sref="tab.meIndex" class="button return-btn">返回</button>
    <h1 class="title" ng-click="backToTop()">积分商城</h1>
  </ion-header-bar>
  <ion-content has-bouncing="true">
        <div class="row row-wrap">

            <div class="col-50" ng-repeat="product in productList" >
                <a class="integrat-li-box">
                    <div class="integrat-li-pic" ng-click="showProduct($index)">
                      <img ng-src="{{ENV.picPath}}{{product.psp_img_url}}" />
                    </div>
                    <div class="integrat-li-main">
                        <div class="integrat-li-money"> <i class="integrat-li-money-icon"></i>{{getFormatNum(product.psp_point)}}</div>
                        <div class="integrat-li-con-overflow" ng-bind="product.psp_name"></div>
                        <div class="integrat-li-con">
                          <button ng-click="gotoExchange('{{product.psp_id}}')" type="button" class="button button-small integrat-red-btn">马上兑换</button>
                        </div>
                    </div>
                </a>
            </div>
        </div>
</ion-content>
  <div class="popup-container popup-showing active" ng-if="isShowProductDetail">
    <div class="popup popup-full-warp">
      <button class="popup-close-btn" ng-click="closePopup()"></button>
      <div class="popup-body">
        <div class="integrat-li-pic"><img src="{{ENV.picPath}}big_{{productImg}}" alt=""/></div>
        <div class="integrat-popup-main">
          <div class="integrat-li-money"> <i class="integrat-li-money-icon"></i> {{getFormatNum(productPoint)}}</div>
          <div class="integrat-li-con" ng-bind="productName">金龙船红葡萄酒 1500ml</div>
          <div class="integrat-li-con"><span class="gery">市场参考价：</span><em class="purple" ng-bind="getFormatNum(productPrice)">￥563</em></div>
          <div class="integrat-li-con">
            <button type="button" class="button button-full claret-red-btn" on-touch="gotoExchange('{{productId}}')">马上兑换</button>
          </div>
        </div>
      </div>
    </div>
  </div>


  <div class="popup-container popup-showing active" ng-if="isShowPopup">
    <div class="popup popup-white-warp">
      <div class="popup-body">
        <div class="popup-msg-main">
          <p class="popup-msg-txt" ng-bind="currentPoint"></p>
          <p class="popup-msg-txt" ng-bind="goodPoint"></p>
          <p class="popup-msg-txt" ng-bind="resultMsg"></p>
          <p class="popup-msg-bottom">
            <button class="button popup-red-btn" on-touch="closeMsgPopup()">确定</button>
          </p>
        </div>
      </div>
    </div>
  </div>

</ion-view>
